package com.lkwlw.tplms.system.action;

import com.lkwlw.tplms.system.dao.mapper.AdmininfoMapper;
import com.lkwlw.tplms.system.dao.model.Admininfo;
import com.opensymphony.xwork2.ActionSupport;

public class AddUserAction extends ActionSupport {
	private static final long serialVersionUID = 1197767856147556894L;
	
	private String username;
	
	private String passwd;
	
	private Integer accountType;
	
	private String fullName;
	
	private String area;
	
	private String phone;
	
	private String addre;
	
	private String job;
	
	private String cardNo;
	
	private String remark;
	
	private String email;
	
	private AdmininfoMapper admininfoMapper;
	
	public String execute(){
		Admininfo admin = new Admininfo();
		admin.setUsername(username);
		admin.setAccountType(accountType);
		admin.setAddre(addre);
		admin.setArea(area);
		admin.setCardNo(cardNo);
		admin.setEmail(email);
		admin.setFullName(fullName);
		admin.setJob(job);
		admin.setPasswd(passwd);
		admin.setPhone(phone);
		admin.setRemark(remark);
		admininfoMapper.insertSelective(admin);
		return SUCCESS;
	}
    
	public String gotoAddUser(){
		
		
		return SUCCESS;
	}
    
	public void setAdmininfoMapper(AdmininfoMapper admininfoMapper) {
		this.admininfoMapper = admininfoMapper;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public void setPasswd(String passwd) {
		this.passwd = passwd;
	}

	public void setAccountType(Integer accountType) {
		this.accountType = accountType;
	}

	public void setFullName(String fullName) {
		this.fullName = fullName;
	}

	public void setArea(String area) {
		this.area = area;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public void setAddre(String addre) {
		this.addre = addre;
	}

	public void setJob(String job) {
		this.job = job;
	}

	public void setCardNo(String cardNo) {
		this.cardNo = cardNo;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	
}
